import React, { useEffect } from 'react'
import { RouteComponentProps } from 'react-router-dom'
import store from '../redux/store'

interface IParams {
    filmId: string
}

export default function Detail(props: RouteComponentProps<IParams>) {
    useEffect(() => {
        store.dispatch({
            type: "hide"
        })
        return () => {
            store.dispatch({
                type: "show"
            })
        }
    }, [])
    return (
        <div>Detail-{props.match.params.filmId}</div>
    )
}
